Integrand size = 12, antiderivative size = 75 \[ \int (c+d x) \sec (a+b x) \, dx=-\frac {2 i (c+d x) \arctan \left (e^{i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2} \]
-2*I*(d*x+c)*arctan(exp(I*(b*x+a)))/b+I*d*polylog(2,-I*exp(I*(b*x+a)))/b^2 -I*d*polylog(2,I*exp(I*(b*x+a)))/b^2
Time = 0.01 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.16 \[ \int (c+d x) \sec (a+b x) \, dx=-\frac {2 i d x \arctan \left (e^{i a+i b x}\right )}{b}+\frac {c \text {arctanh}(\sin (a+b x))}{b}+\frac {i d \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2} \]
((-2*I)*d*x*ArcTan[E^(I*a + I*b*x)])/b + (c*ArcTanh[Sin[a + b*x]])/b + (I* d*PolyLog[2, (-I)*E^(I*(a + b*x))])/b^2 - (I*d*PolyLog[2, I*E^(I*(a + b*x) )])/b^2
Time = 0.29 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4669, 2715, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x) \sec (a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) \csc \left (a+b x+\frac {\pi }{2}\right )dx\) |
\(\Big \downarrow \) 4669 |
\(\displaystyle -\frac {d \int \log \left (1-i e^{i (a+b x)}\right )dx}{b}+\frac {d \int \log \left (1+i e^{i (a+b x)}\right )dx}{b}-\frac {2 i (c+d x) \arctan \left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle \frac {i d \int e^{-i (a+b x)} \log \left (1-i e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {i d \int e^{-i (a+b x)} \log \left (1+i e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {2 i (c+d x) \arctan \left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle -\frac {2 i (c+d x) \arctan \left (e^{i (a+b x)}\right )}{b}+\frac {i d \operatorname {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \operatorname {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}\) |
((-2*I)*(c + d*x)*ArcTan[E^(I*(a + b*x))])/b + (I*d*PolyLog[2, (-I)*E^(I*( a + b*x))])/b^2 - (I*d*PolyLog[2, I*E^(I*(a + b*x))])/b^2
3.1.31.3.1 Defintions of rubi rules used
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol ] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^(I*k*Pi)*E^(I*(e + f*x))]/f), x] + (-Si mp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x ))], x], x]) /; FreeQ[{c, d, e, f}, x] && IntegerQ[2*k] && IGtQ[m, 0]
Time = 0.98 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.71
method | result | size |
derivativedivides | \(\frac {-\frac {d a \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b}+c \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )+\frac {d \left (-\left (b x +a \right ) \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )+\left (b x +a \right ) \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(128\) |
default | \(\frac {-\frac {d a \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )}{b}+c \ln \left (\sec \left (b x +a \right )+\tan \left (b x +a \right )\right )+\frac {d \left (-\left (b x +a \right ) \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )+\left (b x +a \right ) \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )+i \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )-i \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )\right )}{b}}{b}\) | \(128\) |
risch | \(-\frac {2 i c \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {i d \operatorname {dilog}\left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {i d \operatorname {dilog}\left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 i d a \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(167\) |
1/b*(-1/b*d*a*ln(sec(b*x+a)+tan(b*x+a))+c*ln(sec(b*x+a)+tan(b*x+a))+1/b*d* (-(b*x+a)*ln(1+I*exp(I*(b*x+a)))+(b*x+a)*ln(1-I*exp(I*(b*x+a)))+I*dilog(1+ I*exp(I*(b*x+a)))-I*dilog(1-I*exp(I*(b*x+a)))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 306 vs. \(2 (60) = 120\).
Time = 0.29 (sec) , antiderivative size = 306, normalized size of antiderivative = 4.08 \[ \int (c+d x) \sec (a+b x) \, dx=\frac {-i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) + {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{2 \, b^{2}} \]
1/2*(-I*d*dilog(I*cos(b*x + a) + sin(b*x + a)) - I*d*dilog(I*cos(b*x + a) - sin(b*x + a)) + I*d*dilog(-I*cos(b*x + a) + sin(b*x + a)) + I*d*dilog(-I *cos(b*x + a) - sin(b*x + a)) + (b*c - a*d)*log(cos(b*x + a) + I*sin(b*x + a) + I) - (b*c - a*d)*log(cos(b*x + a) - I*sin(b*x + a) + I) + (b*d*x + a *d)*log(I*cos(b*x + a) + sin(b*x + a) + 1) - (b*d*x + a*d)*log(I*cos(b*x + a) - sin(b*x + a) + 1) + (b*d*x + a*d)*log(-I*cos(b*x + a) + sin(b*x + a) + 1) - (b*d*x + a*d)*log(-I*cos(b*x + a) - sin(b*x + a) + 1) + (b*c - a*d )*log(-cos(b*x + a) + I*sin(b*x + a) + I) - (b*c - a*d)*log(-cos(b*x + a) - I*sin(b*x + a) + I))/b^2
\[ \int (c+d x) \sec (a+b x) \, dx=\int \left (c + d x\right ) \sec {\left (a + b x \right )}\, dx \]
\[ \int (c+d x) \sec (a+b x) \, dx=\int { {\left (d x + c\right )} \sec \left (b x + a\right ) \,d x } \]
1/2*(4*b*d*integrate((x*cos(2*b*x + 2*a)*cos(b*x + a) + x*sin(2*b*x + 2*a) *sin(b*x + a) + x*cos(b*x + a))/(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1), x) + c*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*s in(b*x + a) + 1) - c*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*sin(b*x + a) + 1))/b
\[ \int (c+d x) \sec (a+b x) \, dx=\int { {\left (d x + c\right )} \sec \left (b x + a\right ) \,d x } \]
Timed out. \[ \int (c+d x) \sec (a+b x) \, dx=\int \frac {c+d\,x}{\cos \left (a+b\,x\right )} \,d x \]